package com.activenetwork.smlite.testcase.other;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Test;

public class TestSurefireTest4  {
	
	static final Logger logger = LoggerFactory.getLogger(TestSurefireTest4.class);

	
	@Test
	public void test1action(){
		WebDriver driver = new FirefoxDriver();
		
		logger.info(TestSurefireTest4.class.getName() + " - start");
		
		
		driver.get("http://ip.chinaz.com/");
		WebElement input = driver.findElement(By.cssSelector("input#address"));
		WebElement search = driver.findElement(By.cssSelector("input#submit1"));
		input.clear();
		input.sendKeys("203.208.47.4");
		search.click();
		
		try {
			Thread.sleep(3000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		String result = driver.findElement(By.cssSelector("span#status strong.red")).getText();
		logger.info(result);
		
		logger.info(TestSurefireTest4.class.getName() + " - end");
		
		driver.quit();
	}

}
